-- GENERATED SPELL FOR [Infinite Chronomancer] --


function spell0_17892(pUnit, Event) --@Arcane Bolt,n/a--
pUnit:FullCastSpellOnTarget(15124,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17892', 1000, 1)
end

function spell1_17892(pUnit, Event) --@Arcane Bolt,n/a--
pUnit:FullCastSpellOnTarget(15230,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17892', 1000, 1)
end

function spell2_17892(pUnit, Event) --@Arcane Explosion,Self--
pUnit:FullCastSpellOnTarget(33623,pUnit)
pUnit:RegisterEvent('Sorts_17892', 1500, 1)
end

function spell3_17892(pUnit, Event) --@Arcane Explosion,Self--
pUnit:FullCastSpellOnTarget(33860,pUnit)
pUnit:RegisterEvent('Sorts_17892', 1500, 1)
end

function spell4_17892(pUnit, Event) --@Corrupt Medivh,n/a--
pUnit:FullCastSpellOnTarget(31326,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17892', 0, 1)
end

function Sorts_17892(pUnit, Event)
local choix_sorts_17892 = math.random(0, 4)
if choix_sorts_17892 == 0 then
pUnit:RegisterEvent('spell0_17892', 1, 1)
end
if choix_sorts_17892 == 1 then
pUnit:RegisterEvent('spell1_17892', 1, 1)
end
if choix_sorts_17892 == 2 then
pUnit:RegisterEvent('spell2_17892', 1, 1)
end
if choix_sorts_17892 == 3 then
pUnit:RegisterEvent('spell3_17892', 1, 1)
end
if choix_sorts_17892 == 4 then
pUnit:RegisterEvent('spell4_17892', 1, 1)
end
end

function mob17892_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17892', math.random(1500, 3000), 1)
end

function mob17892_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17892_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17892_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17892, 1, 'mob17892_Action')
RegisterUnitEvent(17892, 2, 'mob17892_Leave')
RegisterUnitEvent(17892, 3, 'mob17892_Kill')
RegisterUnitEvent(17892, 4, 'mob17892_Die')
